#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

class Solution {
public:
	bool isAnagram(string s, string t)
	{
		int record[26] = { 0 };
		for (int i = 0; i < s.size(); i++)
		{
			record[s[i] - 'a']++;
		}
		for (int i = 0; i < t.size(); i++)
		{
			record[t[i] - 'a']--;
		}
		for (int i = 0; i < 26; i++)
		{
			if (record[i] != 0)
				return false;
		}
		return true;
	}
};